xenconsoled: make guest console visible on NetBSD dom0
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 20 Feb 2009 11:13:11 +0000 (11:13 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 20 Feb 2009 11:13:11 +0000 (11:13 +0000)
After openpty(), slave_fd must be closed or guest console output goes
to the slave while select() in xen console client listens on the
master.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
tools/console/daemon/io.c

index 78aea83ed7d596f2c07e3c4a2ab772a6c44b50ed..19e23f2372357c76fb12d38c980100d337c41fa5 100644 (file)
@@ -420,6 +420,14 @@ static int domain_create_tty(struct domain *dom)
                goto out;
        }
 
+       /* Close the slave fd or the guest console output disappears,
+        * otherwise.
+        */
+       if (dom->slave_fd != -1) {
+               close(dom->slave_fd);
+               dom->slave_fd = -1;
+       }
+
        if (dom->use_consolepath) {
                success = asprintf(&path, "%s/limit", dom->conspath) !=
                        -1;